package Test;

import java.util.Iterator;

public class Review3 implements Iterator<String> {
    private String[] data = {"data1","data2","data3"};
    private int cursor = 0;
    @Override
    public boolean hasNext() {
        if (cursor < data.length){return true;}
        return false;
        
    }
    @Override
    public String next() {
        String n = data[cursor];
        cursor ++;
        return n;
        
    }
    public static void main(String[] args) {
        Review3 review3 = new Review3();

    }
}
